<!-- BEGIN PAGE CONTENT-->
<div class="row">
    <div class="col-md-12 portlet">
        <div class="portlet-title">
            <div class="caption"><span ng-show="addr.isContract">Contract </span>Overview</div>
        </div>
        <div class="portlet-body">
            <div class="row">
                <div class="col-md-6 center">
                    <div>
                        <span class="eth-stat-text">
                          GO Balance: <i class="fa fa-question-circle" data-toggle="tooltip" data-placement="right"
                                        title="Note: Balance may not reflect transaction data if you have transactions resulting from Contract Internal Transactions. We are working on adding that functionality."></i>
                        </span>
                        <span class="{{(addr.balance.toString().length < 10) && 'eth-stat-title' || 'eth-stat-title-small'}}">
                          &nbsp; {{ addr.balance | bigNumber}}
                        </span>
                        <div class="margin-top-20">
                            <span class="eth-stat-text">Signed:</span> {{ addr.signed}}
                        </div>
                        <div class="margin-top-20">
                            <span class="eth-stat-text">Transactions:</span> {{ addr.count | bigNumber}}
                        </div>
                    </div>
                </div>
            </div><!--end row-->
        </div><!--end portlet-body-->
    </div><!--end portlet-->

    <!-- Begin: Transaction Datatable -->
    <div class="portlet portlet-datatable col-md-12">
        <div class="portlet-body">
            <div class="tabbable-line">
                <ul class="nav nav-tabs ">
                    <li ng-class="{active: activeTab == 'tab_addr_1' || !activeTab}">
                        <a href="#tab_addr_1" data-toggle="tab" aria-expanded="true"> Transactions </a>
                    </li>
                    <li ng-class="{active: activeTab == 'tab_addr_2'}" ng-show="addr.isContract">
                        <a href="#tab_addr_2" data-toggle="tab" aria-expanded="false"> Internal Transactions </a>
                    </li>
                    <li class="" ng-show="addr.isContract" ng-class="{active: activeTab == 'tab_addr_3'}">
                        <a href="#tab_addr_3" data-toggle="tab" aria-expanded="false"> Contract Source </a>
                    </li>
                </ul>
                <div class="tab-content">
                    <div class="tab-pane table-container" ng-class="{active: activeTab == 'tab_addr_1' || !activeTab}"
                         id="tab_addr_1"><!-- Datatable tab -->

                        <table class="table table-hover" id="table_txs"
                               style="table-layout:fixed;width: 98% !important;">
                            <thead>
                            <tr role="row" class="heading">
                                <th width="15%"> TxHash</th>
                                <th width="5%"> Block</th>
                                <th width="15%"> From</th>
                                <th width="15%"> To</th>
                                <th width="15%"> GO</th>
                                <th width="0%"> gas</th>
                                <th width="12%"> Age</th>
                            </tr>
                            </thead>
                            <tbody></tbody>
                        </table>
                    </div><!-- End: Datatable tab -->
                    <div class="tab-pane" id="tab_addr_2" ng-show="addr.isContract"
                         ng-class="{active: activeTab == 'tab_addr_2'}">
                        <table class="table table-condensed" ng-show="addr.isContract">
                            <thead>
                            <tr>
                                <th width="15%"> TxHash</th>
                                <th width="8%"> Block</th>
                                <th width="15%"> From</th>
                                <th width="15%"> To</th>
                                <th width="10%"> GO</th>
                                <th width="0%"> gas</th>
                                <th></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="t in internal_transactions track by $index">
                                <td class="truncate-txhash"><a
                                        href="/tx/{{t.transactionHash}}">{{t.transactionHash}}</a></td>
                                <td style="text-align:right"><a href="/block/{{t.blockNumber}}">{{t.blockNumber |
                                    bigNumber}}</a>
                                <td class="truncate-addrhash"><a href="/addr/{{t.from}}">{{t.from}}</a></td>
                                <td class="truncate-addrhash"><a href="/addr/{{t.to}}">{{t.to}}</a></td>
                                <td style="text-align:right"> {{t.value | bigNumber}}</td>
                                <td style="text-align:right"> {{t.gas | bigNumber}}</td>
                                <td style="text-align:center"><span class="label label-sm label-info {{t.type}}"> {{t.type}}</span><span
                                        class="label label-sm label-danger" ng-show="t.error"> {{t.error}}</span></td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="tab-pane" id="tab_addr_3" ng-show="addr.isContract"
                         ng-class="{active: activeTab == 'tab_addr_3'}">
                        <contract-source></contract-source>
                    </div>
                </div>
            </div>

        </div>
    </div><!-- End: portlet -->
</div>
